
#ifndef _ALITTLE_RENDERSYSTEM_H_
#define _ALITTLE_RENDERSYSTEM_H_

#include <SDL2/SDL.h>
#include <SDL2/SDL_opengl.h>
#include <string>

namespace ALittle
{

class RenderSystem
{
public:
	static RenderSystem& Instance();

public:
	void Setup();
	void Shutdown();
	void RegisterToScript();

public:
	void Render();

public:
	void SetWindowSize(unsigned int width, unsigned int height);
	void HandleWindowResized(unsigned int width, unsigned int height);

public:
	unsigned int GetWindowWidth() const;
	unsigned int GetWindowHeight() const;

public:
	unsigned int GetRenderInterval() const;

private:
	SDL_GLContext m_context;

private:
	SDL_Window* m_window;
	unsigned int m_width, m_height;
	std::string m_title;
	bool m_fullscreen;

private:
	RenderSystem();
	~RenderSystem();
};

} // ALittle

#define g_RenderSystem ALittle::RenderSystem::Instance()

#endif // _ALITTLE_RENDERSYSTEM_H_
